<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: cwh
 * @LastEditTime: 2022-01-08 17:32:26
-->
<template>
  <div  ref="bottom2_container" style="height:95%"></div>
</template>
<script>
import { Bar } from '@antv/g2plot'
export default {
  data(){
    return{
      dataArr:[
         { month: '1月', value: 20 },
         { month: '2月', value: 30 },
         { month: '3月', value: 35 },
         { month: '4月', value: 25 },
         { month: '5月', value: 35 },
      ]
    }
  },
  mounted() {
    this.initChart()
  },
  methods:{
    initChart(){
      const bar = new Bar(this.$refs.bottom2_container,{
        data:this.dataArr,
        xField: 'value',
        yField: 'month',
        seriesField: 'month',
         legend: {
         position: 'top-left',
         },
      })
      bar.render()
    }
  }
}

</script>